/**10个评委给选手打分，选手最后得分为：去掉一个最高分和去掉一个最低分，剩余8人的平均值。*/

#include <stdio.h>

int main()
{
    int input, max, min, sum;
    max = -32768;
    min = 32767;
    sum = 0;

    for (int i = 0; i < 10; i++)
    {
        printf("Input number %d=", i + 1);
        scanf("%d", &input);
        sum += input;
        if (input > max)
            max = input;
        if (input < min)
            min = input;
    }

    printf("Concert max score:%d\nConcert min score:%d\n", max, min);
    printf("Average score: %d\n", (sum - max - min) / 8);
}